{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 107,
   "metadata": {},
   "outputs": [],
   "source": [
    "import keras"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "data = pd.read_csv('./train.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 110,
   "metadata": {},
   "outputs": [],
   "source": [
    "y = data.Survived"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "metadata": {},
   "outputs": [],
   "source": [
    "x = data[['Pclass','Sex','Age','SibSp','Parch','Fare','Embarked']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 112,
   "metadata": {},
   "outputs": [],
   "source": [
    "x = pd.get_dummies(x,columns=['Pclass','Sex','Embarked'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 147,
   "metadata": {},
   "outputs": [],
   "source": [
    "x['Age'] = x.Age.fillna(x.Age.mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 148,
   "metadata": {},
   "outputs": [
    {
     "ename": "KeyError",
     "evalue": "'Sex_female'",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mKeyError\u001b[0m                                  Traceback (most recent call last)",
      "\u001b[1;32mE:\\Anacona3\\envs\\kr\\lib\\site-packages\\pandas\\core\\indexes\\base.py\u001b[0m in \u001b[0;36mget_loc\u001b[1;34m(self, key, method, tolerance)\u001b[0m\n\u001b[0;32m   2441\u001b[0m             \u001b[1;32mtry\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 2442\u001b[1;33m                 \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_engine\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_loc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   2443\u001b[0m             \u001b[1;32mexcept\u001b[0m \u001b[0mKeyError\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mpandas\\_libs\\index.pyx\u001b[0m in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc (pandas\\_libs\\index.c:5280)\u001b[1;34m()\u001b[0m\n",
      "\u001b[1;32mpandas\\_libs\\index.pyx\u001b[0m in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc (pandas\\_libs\\index.c:5126)\u001b[1;34m()\u001b[0m\n",
      "\u001b[1;32mpandas\\_libs\\hashtable_class_helper.pxi\u001b[0m in \u001b[0;36mpandas._libs.hashtable.PyObjectHashTable.get_item (pandas\\_libs\\hashtable.c:20523)\u001b[1;34m()\u001b[0m\n",
      "\u001b[1;32mpandas\\_libs\\hashtable_class_helper.pxi\u001b[0m in \u001b[0;36mpandas._libs.hashtable.PyObjectHashTable.get_item (pandas\\_libs\\hashtable.c:20477)\u001b[1;34m()\u001b[0m\n",
      "\u001b[1;31mKeyError\u001b[0m: 'Sex_female'",
      "\nDuring handling of the above exception, another exception occurred:\n",
      "\u001b[1;31mKeyError\u001b[0m                                  Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-148-3f1140b5a4d1>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[1;32mdel\u001b[0m \u001b[0mx\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m\"Sex_female\"\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;32mE:\\Anacona3\\envs\\kr\\lib\\site-packages\\pandas\\core\\generic.py\u001b[0m in \u001b[0;36m__delitem__\u001b[1;34m(self, key)\u001b[0m\n\u001b[0;32m   1899\u001b[0m             \u001b[1;31m# there was no match, this call should raise the appropriate\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1900\u001b[0m             \u001b[1;31m# exception:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1901\u001b[1;33m             \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_data\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdelete\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1902\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1903\u001b[0m         \u001b[1;31m# delete from the caches\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mE:\\Anacona3\\envs\\kr\\lib\\site-packages\\pandas\\core\\internals.py\u001b[0m in \u001b[0;36mdelete\u001b[1;34m(self, item)\u001b[0m\n\u001b[0;32m   3647\u001b[0m         \u001b[0mDelete\u001b[0m \u001b[0mselected\u001b[0m \u001b[0mitem\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mitems\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mnon\u001b[0m\u001b[1;33m-\u001b[0m\u001b[0munique\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;32min\u001b[0m\u001b[1;33m-\u001b[0m\u001b[0mplace\u001b[0m\u001b[1;33m.\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   3648\u001b[0m         \"\"\"\n\u001b[1;32m-> 3649\u001b[1;33m         \u001b[0mindexer\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mitems\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_loc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mitem\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   3650\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   3651\u001b[0m         \u001b[0mis_deleted\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mzeros\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mshape\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mdtype\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mbool_\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mE:\\Anacona3\\envs\\kr\\lib\\site-packages\\pandas\\core\\indexes\\base.py\u001b[0m in \u001b[0;36mget_loc\u001b[1;34m(self, key, method, tolerance)\u001b[0m\n\u001b[0;32m   2442\u001b[0m                 \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_engine\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_loc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   2443\u001b[0m             \u001b[1;32mexcept\u001b[0m \u001b[0mKeyError\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 2444\u001b[1;33m                 \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_engine\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_loc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_maybe_cast_indexer\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   2445\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   2446\u001b[0m         \u001b[0mindexer\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_indexer\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mmethod\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mmethod\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtolerance\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mtolerance\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mpandas\\_libs\\index.pyx\u001b[0m in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc (pandas\\_libs\\index.c:5280)\u001b[1;34m()\u001b[0m\n",
      "\u001b[1;32mpandas\\_libs\\index.pyx\u001b[0m in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc (pandas\\_libs\\index.c:5126)\u001b[1;34m()\u001b[0m\n",
      "\u001b[1;32mpandas\\_libs\\hashtable_class_helper.pxi\u001b[0m in \u001b[0;36mpandas._libs.hashtable.PyObjectHashTable.get_item (pandas\\_libs\\hashtable.c:20523)\u001b[1;34m()\u001b[0m\n",
      "\u001b[1;32mpandas\\_libs\\hashtable_class_helper.pxi\u001b[0m in \u001b[0;36mpandas._libs.hashtable.PyObjectHashTable.get_item (pandas\\_libs\\hashtable.c:20477)\u001b[1;34m()\u001b[0m\n",
      "\u001b[1;31mKeyError\u001b[0m: 'Sex_female'"
     ]
    }
   ],
   "source": [
    "del x[\"Sex_female\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 149,
   "metadata": {},
   "outputs": [],
   "source": [
    "model = keras.Sequential()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 150,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from keras import layers"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 151,
   "metadata": {},
   "outputs": [],
   "source": [
    "model.add(layers.Dense(1,input_dim=11,activation='sigmoid'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 152,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "model.compile(optimizer='adam',loss='binary_crossentropy',metrics=['acc'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 153,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 1/300\n",
      "891/891 [==============================] - 0s 370us/step - loss: 9.0955 - acc: 0.3838\n",
      "Epoch 2/300\n",
      "891/891 [==============================] - 0s 37us/step - loss: 8.7600 - acc: 0.3838\n",
      "Epoch 3/300\n",
      "891/891 [==============================] - 0s 34us/step - loss: 8.3588 - acc: 0.3838\n",
      "Epoch 4/300\n",
      "891/891 [==============================] - 0s 35us/step - loss: 7.8586 - acc: 0.3838\n",
      "Epoch 5/300\n",
      "891/891 [==============================] - 0s 38us/step - loss: 7.2468 - acc: 0.3838\n",
      "Epoch 6/300\n",
      "891/891 [==============================] - 0s 38us/step - loss: 6.4974 - acc: 0.3838\n",
      "Epoch 7/300\n",
      "891/891 [==============================] - 0s 39us/step - loss: 5.6063 - acc: 0.3838\n",
      "Epoch 8/300\n",
      "891/891 [==============================] - 0s 45us/step - loss: 4.6092 - acc: 0.3838\n",
      "Epoch 9/300\n",
      "891/891 [==============================] - 0s 42us/step - loss: 3.4998 - acc: 0.3838\n",
      "Epoch 10/300\n",
      "891/891 [==============================] - 0s 38us/step - loss: 2.3412 - acc: 0.3838\n",
      "Epoch 11/300\n",
      "891/891 [==============================] - 0s 39us/step - loss: 1.3446 - acc: 0.3939\n",
      "Epoch 12/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.7623 - acc: 0.5701\n",
      "Epoch 13/300\n",
      "891/891 [==============================] - 0s 32us/step - loss: 0.6303 - acc: 0.6667\n",
      "Epoch 14/300\n",
      "891/891 [==============================] - 0s 34us/step - loss: 0.6211 - acc: 0.6678\n",
      "Epoch 15/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.6190 - acc: 0.6723\n",
      "Epoch 16/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.6159 - acc: 0.6801\n",
      "Epoch 17/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.6149 - acc: 0.6835\n",
      "Epoch 18/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.6106 - acc: 0.6869\n",
      "Epoch 19/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.6092 - acc: 0.6891\n",
      "Epoch 20/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.6084 - acc: 0.6958\n",
      "Epoch 21/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.6026 - acc: 0.6902\n",
      "Epoch 22/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.6005 - acc: 0.6914\n",
      "Epoch 23/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.5983 - acc: 0.6970\n",
      "Epoch 24/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.5958 - acc: 0.7071\n",
      "Epoch 25/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.5934 - acc: 0.6947\n",
      "Epoch 26/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.5909 - acc: 0.7071\n",
      "Epoch 27/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.5895 - acc: 0.7037\n",
      "Epoch 28/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.5864 - acc: 0.6981\n",
      "Epoch 29/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.5854 - acc: 0.7071\n",
      "Epoch 30/300\n",
      "891/891 [==============================] - 0s 32us/step - loss: 0.5839 - acc: 0.6992\n",
      "Epoch 31/300\n",
      "891/891 [==============================] - 0s 31us/step - loss: 0.5803 - acc: 0.7160\n",
      "Epoch 32/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.5778 - acc: 0.7116\n",
      "Epoch 33/300\n",
      "891/891 [==============================] - 0s 32us/step - loss: 0.5754 - acc: 0.7082\n",
      "Epoch 34/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.5733 - acc: 0.7138\n",
      "Epoch 35/300\n",
      "891/891 [==============================] - 0s 32us/step - loss: 0.5714 - acc: 0.7104\n",
      "Epoch 36/300\n",
      "891/891 [==============================] - 0s 31us/step - loss: 0.5699 - acc: 0.7194\n",
      "Epoch 37/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.5669 - acc: 0.7160\n",
      "Epoch 38/300\n",
      "891/891 [==============================] - 0s 34us/step - loss: 0.5652 - acc: 0.7205\n",
      "Epoch 39/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.5651 - acc: 0.7127\n",
      "Epoch 40/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.5616 - acc: 0.7228\n",
      "Epoch 41/300\n",
      "891/891 [==============================] - 0s 34us/step - loss: 0.5597 - acc: 0.7160\n",
      "Epoch 42/300\n",
      "891/891 [==============================] - 0s 33us/step - loss: 0.5590 - acc: 0.7250\n",
      "Epoch 43/300\n",
      "891/891 [==============================] - 0s 31us/step - loss: 0.5581 - acc: 0.7183\n",
      "Epoch 44/300\n",
      "891/891 [==============================] - 0s 31us/step - loss: 0.5554 - acc: 0.7262\n",
      "Epoch 45/300\n",
      "891/891 [==============================] - 0s 31us/step - loss: 0.5536 - acc: 0.7284\n",
      "Epoch 46/300\n",
      "891/891 [==============================] - 0s 38us/step - loss: 0.5537 - acc: 0.7116\n",
      "Epoch 47/300\n",
      "891/891 [==============================] - 0s 34us/step - loss: 0.5532 - acc: 0.7329\n",
      "Epoch 48/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.5484 - acc: 0.7205\n",
      "Epoch 49/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.5470 - acc: 0.7295\n",
      "Epoch 50/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.5448 - acc: 0.7239\n",
      "Epoch 51/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.5434 - acc: 0.7340\n",
      "Epoch 52/300\n",
      "891/891 [==============================] - 0s 32us/step - loss: 0.5410 - acc: 0.7306\n",
      "Epoch 53/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.5405 - acc: 0.7250\n",
      "Epoch 54/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.5388 - acc: 0.7374\n",
      "Epoch 55/300\n",
      "891/891 [==============================] - 0s 35us/step - loss: 0.5374 - acc: 0.7419\n",
      "Epoch 56/300\n",
      "891/891 [==============================] - 0s 31us/step - loss: 0.5361 - acc: 0.7329\n",
      "Epoch 57/300\n",
      "891/891 [==============================] - 0s 26us/step - loss: 0.5342 - acc: 0.7396\n",
      "Epoch 58/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.5329 - acc: 0.7363\n",
      "Epoch 59/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.5317 - acc: 0.7407\n",
      "Epoch 60/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.5304 - acc: 0.7542\n",
      "Epoch 61/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.5293 - acc: 0.7407\n",
      "Epoch 62/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.5278 - acc: 0.7452\n",
      "Epoch 63/300\n",
      "891/891 [==============================] - 0s 32us/step - loss: 0.5269 - acc: 0.7542\n",
      "Epoch 64/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.5248 - acc: 0.7542\n",
      "Epoch 65/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.5239 - acc: 0.7508\n",
      "Epoch 66/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.5227 - acc: 0.7553\n",
      "Epoch 67/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.5210 - acc: 0.7621\n",
      "Epoch 68/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.5200 - acc: 0.7598\n",
      "Epoch 69/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.5201 - acc: 0.7609\n",
      "Epoch 70/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.5186 - acc: 0.7733\n",
      "Epoch 71/300\n",
      "891/891 [==============================] - 0s 32us/step - loss: 0.5187 - acc: 0.7587\n",
      "Epoch 72/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.5159 - acc: 0.7755\n",
      "Epoch 73/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.5153 - acc: 0.7688\n",
      "Epoch 74/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.5144 - acc: 0.7722\n",
      "Epoch 75/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.5133 - acc: 0.7755\n",
      "Epoch 76/300\n",
      "891/891 [==============================] - 0s 35us/step - loss: 0.5135 - acc: 0.7722\n",
      "Epoch 77/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.5111 - acc: 0.7800\n",
      "Epoch 78/300\n",
      "891/891 [==============================] - 0s 33us/step - loss: 0.5092 - acc: 0.7699\n",
      "Epoch 79/300\n",
      "891/891 [==============================] - 0s 33us/step - loss: 0.5090 - acc: 0.7811\n",
      "Epoch 80/300\n",
      "891/891 [==============================] - 0s 32us/step - loss: 0.5075 - acc: 0.7778\n",
      "Epoch 81/300\n",
      "891/891 [==============================] - 0s 32us/step - loss: 0.5064 - acc: 0.7811\n",
      "Epoch 82/300\n",
      "891/891 [==============================] - 0s 31us/step - loss: 0.5061 - acc: 0.7789\n",
      "Epoch 83/300\n",
      "891/891 [==============================] - 0s 35us/step - loss: 0.5049 - acc: 0.7789\n",
      "Epoch 84/300\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "891/891 [==============================] - 0s 41us/step - loss: 0.5058 - acc: 0.7834\n",
      "Epoch 85/300\n",
      "891/891 [==============================] - 0s 32us/step - loss: 0.5043 - acc: 0.7823\n",
      "Epoch 86/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.5020 - acc: 0.7845\n",
      "Epoch 87/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.5052 - acc: 0.7789\n",
      "Epoch 88/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.5020 - acc: 0.7823\n",
      "Epoch 89/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4999 - acc: 0.7868\n",
      "Epoch 90/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4989 - acc: 0.7879\n",
      "Epoch 91/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4979 - acc: 0.7845\n",
      "Epoch 92/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4985 - acc: 0.7823\n",
      "Epoch 93/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4976 - acc: 0.7845\n",
      "Epoch 94/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4945 - acc: 0.7879\n",
      "Epoch 95/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4970 - acc: 0.7811\n",
      "Epoch 96/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4944 - acc: 0.7879\n",
      "Epoch 97/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4933 - acc: 0.7868\n",
      "Epoch 98/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4921 - acc: 0.7890\n",
      "Epoch 99/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4914 - acc: 0.7879\n",
      "Epoch 100/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4907 - acc: 0.7901\n",
      "Epoch 101/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4905 - acc: 0.7924\n",
      "Epoch 102/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4899 - acc: 0.7912\n",
      "Epoch 103/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4888 - acc: 0.7879\n",
      "Epoch 104/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4879 - acc: 0.7912\n",
      "Epoch 105/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4907 - acc: 0.7890\n",
      "Epoch 106/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4876 - acc: 0.7879\n",
      "Epoch 107/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4856 - acc: 0.7912\n",
      "Epoch 108/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4868 - acc: 0.7935\n",
      "Epoch 109/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4862 - acc: 0.7912\n",
      "Epoch 110/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4844 - acc: 0.7969\n",
      "Epoch 111/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4835 - acc: 0.7924\n",
      "Epoch 112/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4837 - acc: 0.7879\n",
      "Epoch 113/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4830 - acc: 0.7935\n",
      "Epoch 114/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4825 - acc: 0.7935\n",
      "Epoch 115/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4814 - acc: 0.7957\n",
      "Epoch 116/300\n",
      "891/891 [==============================] - 0s 31us/step - loss: 0.4823 - acc: 0.7946\n",
      "Epoch 117/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4798 - acc: 0.7924\n",
      "Epoch 118/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4793 - acc: 0.7901\n",
      "Epoch 119/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4789 - acc: 0.7946\n",
      "Epoch 120/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4783 - acc: 0.7924\n",
      "Epoch 121/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4787 - acc: 0.7924\n",
      "Epoch 122/300\n",
      "891/891 [==============================] - 0s 32us/step - loss: 0.4784 - acc: 0.8002\n",
      "Epoch 123/300\n",
      "891/891 [==============================] - 0s 36us/step - loss: 0.4763 - acc: 0.7946\n",
      "Epoch 124/300\n",
      "891/891 [==============================] - 0s 40us/step - loss: 0.4763 - acc: 0.8025\n",
      "Epoch 125/300\n",
      "891/891 [==============================] - 0s 34us/step - loss: 0.4753 - acc: 0.7980\n",
      "Epoch 126/300\n",
      "891/891 [==============================] - 0s 31us/step - loss: 0.4755 - acc: 0.8036\n",
      "Epoch 127/300\n",
      "891/891 [==============================] - 0s 33us/step - loss: 0.4747 - acc: 0.7969\n",
      "Epoch 128/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4759 - acc: 0.7991\n",
      "Epoch 129/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4750 - acc: 0.8070\n",
      "Epoch 130/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4739 - acc: 0.7969\n",
      "Epoch 131/300\n",
      "891/891 [==============================] - 0s 34us/step - loss: 0.4729 - acc: 0.8047\n",
      "Epoch 132/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4738 - acc: 0.8036\n",
      "Epoch 133/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4751 - acc: 0.7969\n",
      "Epoch 134/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4716 - acc: 0.8070\n",
      "Epoch 135/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4714 - acc: 0.8047\n",
      "Epoch 136/300\n",
      "891/891 [==============================] - 0s 26us/step - loss: 0.4708 - acc: 0.8070\n",
      "Epoch 137/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4691 - acc: 0.8047\n",
      "Epoch 138/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4695 - acc: 0.8047\n",
      "Epoch 139/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4688 - acc: 0.8025\n",
      "Epoch 140/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4694 - acc: 0.8070\n",
      "Epoch 141/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4722 - acc: 0.8092\n",
      "Epoch 142/300\n",
      "891/891 [==============================] - 0s 32us/step - loss: 0.4686 - acc: 0.8081\n",
      "Epoch 143/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4696 - acc: 0.8070\n",
      "Epoch 144/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4677 - acc: 0.8092\n",
      "Epoch 145/300\n",
      "891/891 [==============================] - 0s 31us/step - loss: 0.4676 - acc: 0.8092\n",
      "Epoch 146/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4673 - acc: 0.8025\n",
      "Epoch 147/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4660 - acc: 0.8103\n",
      "Epoch 148/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4669 - acc: 0.8058\n",
      "Epoch 149/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4659 - acc: 0.8070\n",
      "Epoch 150/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4659 - acc: 0.8092\n",
      "Epoch 151/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4640 - acc: 0.8081\n",
      "Epoch 152/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4641 - acc: 0.8114\n",
      "Epoch 153/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4638 - acc: 0.8103\n",
      "Epoch 154/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4643 - acc: 0.8036\n",
      "Epoch 155/300\n",
      "891/891 [==============================] - 0s 26us/step - loss: 0.4630 - acc: 0.8148\n",
      "Epoch 156/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4626 - acc: 0.8103\n",
      "Epoch 157/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4619 - acc: 0.8126\n",
      "Epoch 158/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4619 - acc: 0.8081\n",
      "Epoch 159/300\n",
      "891/891 [==============================] - 0s 32us/step - loss: 0.4626 - acc: 0.8081\n",
      "Epoch 160/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4619 - acc: 0.8137\n",
      "Epoch 161/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4619 - acc: 0.8081\n",
      "Epoch 162/300\n",
      "891/891 [==============================] - 0s 34us/step - loss: 0.4610 - acc: 0.8092\n",
      "Epoch 163/300\n",
      "891/891 [==============================] - 0s 35us/step - loss: 0.4602 - acc: 0.8126\n",
      "Epoch 164/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4602 - acc: 0.8137\n",
      "Epoch 165/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4597 - acc: 0.8126\n",
      "Epoch 166/300\n",
      "891/891 [==============================] - 0s 32us/step - loss: 0.4594 - acc: 0.8126\n",
      "Epoch 167/300\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "891/891 [==============================] - 0s 27us/step - loss: 0.4590 - acc: 0.8148\n",
      "Epoch 168/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4597 - acc: 0.8092\n",
      "Epoch 169/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4598 - acc: 0.8159\n",
      "Epoch 170/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4590 - acc: 0.8148\n",
      "Epoch 171/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4588 - acc: 0.8103\n",
      "Epoch 172/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4597 - acc: 0.8114\n",
      "Epoch 173/300\n",
      "891/891 [==============================] - 0s 33us/step - loss: 0.4576 - acc: 0.8114\n",
      "Epoch 174/300\n",
      "891/891 [==============================] - 0s 26us/step - loss: 0.4580 - acc: 0.8137\n",
      "Epoch 175/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4577 - acc: 0.8137\n",
      "Epoch 176/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4575 - acc: 0.8126\n",
      "Epoch 177/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4570 - acc: 0.8103\n",
      "Epoch 178/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4568 - acc: 0.8126\n",
      "Epoch 179/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4558 - acc: 0.8171\n",
      "Epoch 180/300\n",
      "891/891 [==============================] - 0s 31us/step - loss: 0.4564 - acc: 0.8148\n",
      "Epoch 181/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4554 - acc: 0.8103\n",
      "Epoch 182/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4557 - acc: 0.8171\n",
      "Epoch 183/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4565 - acc: 0.8182\n",
      "Epoch 184/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4560 - acc: 0.8137\n",
      "Epoch 185/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4564 - acc: 0.8092\n",
      "Epoch 186/300\n",
      "891/891 [==============================] - 0s 31us/step - loss: 0.4544 - acc: 0.8126\n",
      "Epoch 187/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4549 - acc: 0.8159\n",
      "Epoch 188/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4544 - acc: 0.8137\n",
      "Epoch 189/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4574 - acc: 0.8182\n",
      "Epoch 190/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4552 - acc: 0.8126\n",
      "Epoch 191/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4544 - acc: 0.8215\n",
      "Epoch 192/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4535 - acc: 0.8092\n",
      "Epoch 193/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4534 - acc: 0.8148\n",
      "Epoch 194/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4546 - acc: 0.8126\n",
      "Epoch 195/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4554 - acc: 0.8114\n",
      "Epoch 196/300\n",
      "891/891 [==============================] - 0s 31us/step - loss: 0.4530 - acc: 0.8148\n",
      "Epoch 197/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4526 - acc: 0.8126\n",
      "Epoch 198/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4522 - acc: 0.8171\n",
      "Epoch 199/300\n",
      "891/891 [==============================] - 0s 32us/step - loss: 0.4537 - acc: 0.8215\n",
      "Epoch 200/300\n",
      "891/891 [==============================] - 0s 26us/step - loss: 0.4527 - acc: 0.8070\n",
      "Epoch 201/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4518 - acc: 0.8171\n",
      "Epoch 202/300\n",
      "891/891 [==============================] - 0s 37us/step - loss: 0.4529 - acc: 0.8103\n",
      "Epoch 203/300\n",
      "891/891 [==============================] - 0s 32us/step - loss: 0.4536 - acc: 0.8148\n",
      "Epoch 204/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4518 - acc: 0.8103\n",
      "Epoch 205/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4508 - acc: 0.8159\n",
      "Epoch 206/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4525 - acc: 0.8070\n",
      "Epoch 207/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4515 - acc: 0.8171\n",
      "Epoch 208/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4509 - acc: 0.8137\n",
      "Epoch 209/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4505 - acc: 0.8148\n",
      "Epoch 210/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4504 - acc: 0.8159\n",
      "Epoch 211/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4510 - acc: 0.8193\n",
      "Epoch 212/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4504 - acc: 0.8137\n",
      "Epoch 213/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4517 - acc: 0.8081\n",
      "Epoch 214/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4502 - acc: 0.8126\n",
      "Epoch 215/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4496 - acc: 0.8103\n",
      "Epoch 216/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4513 - acc: 0.8103\n",
      "Epoch 217/300\n",
      "891/891 [==============================] - 0s 32us/step - loss: 0.4496 - acc: 0.8137\n",
      "Epoch 218/300\n",
      "891/891 [==============================] - 0s 31us/step - loss: 0.4497 - acc: 0.8148\n",
      "Epoch 219/300\n",
      "891/891 [==============================] - 0s 31us/step - loss: 0.4493 - acc: 0.8092\n",
      "Epoch 220/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4491 - acc: 0.8148\n",
      "Epoch 221/300\n",
      "891/891 [==============================] - 0s 31us/step - loss: 0.4493 - acc: 0.8114\n",
      "Epoch 222/300\n",
      "891/891 [==============================] - 0s 33us/step - loss: 0.4515 - acc: 0.8126\n",
      "Epoch 223/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4492 - acc: 0.8058\n",
      "Epoch 224/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4512 - acc: 0.8126\n",
      "Epoch 225/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4485 - acc: 0.8148\n",
      "Epoch 226/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4483 - acc: 0.8092\n",
      "Epoch 227/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4481 - acc: 0.8103\n",
      "Epoch 228/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4483 - acc: 0.8159\n",
      "Epoch 229/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4488 - acc: 0.8070\n",
      "Epoch 230/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4491 - acc: 0.8126\n",
      "Epoch 231/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4479 - acc: 0.8092\n",
      "Epoch 232/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4489 - acc: 0.8137\n",
      "Epoch 233/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4482 - acc: 0.8081\n",
      "Epoch 234/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4473 - acc: 0.8114\n",
      "Epoch 235/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4481 - acc: 0.8092\n",
      "Epoch 236/300\n",
      "891/891 [==============================] - 0s 31us/step - loss: 0.4471 - acc: 0.8137\n",
      "Epoch 237/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4476 - acc: 0.8103\n",
      "Epoch 238/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4471 - acc: 0.8148\n",
      "Epoch 239/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4471 - acc: 0.8126\n",
      "Epoch 240/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4470 - acc: 0.8126\n",
      "Epoch 241/300\n",
      "891/891 [==============================] - 0s 37us/step - loss: 0.4472 - acc: 0.8103\n",
      "Epoch 242/300\n",
      "891/891 [==============================] - 0s 35us/step - loss: 0.4475 - acc: 0.8103\n",
      "Epoch 243/300\n",
      "891/891 [==============================] - 0s 32us/step - loss: 0.4482 - acc: 0.8114\n",
      "Epoch 244/300\n",
      "891/891 [==============================] - 0s 31us/step - loss: 0.4486 - acc: 0.8092\n",
      "Epoch 245/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4464 - acc: 0.8137\n",
      "Epoch 246/300\n",
      "891/891 [==============================] - 0s 31us/step - loss: 0.4466 - acc: 0.8114\n",
      "Epoch 247/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4495 - acc: 0.8013\n",
      "Epoch 248/300\n",
      "891/891 [==============================] - 0s 31us/step - loss: 0.4478 - acc: 0.8092\n",
      "Epoch 249/300\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "891/891 [==============================] - 0s 30us/step - loss: 0.4472 - acc: 0.8070\n",
      "Epoch 250/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4474 - acc: 0.8137\n",
      "Epoch 251/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4463 - acc: 0.8058\n",
      "Epoch 252/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4468 - acc: 0.8092\n",
      "Epoch 253/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4465 - acc: 0.8002\n",
      "Epoch 254/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4477 - acc: 0.8092\n",
      "Epoch 255/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4466 - acc: 0.8137\n",
      "Epoch 256/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4467 - acc: 0.8036\n",
      "Epoch 257/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4456 - acc: 0.8092\n",
      "Epoch 258/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4462 - acc: 0.8081\n",
      "Epoch 259/300\n",
      "891/891 [==============================] - 0s 32us/step - loss: 0.4471 - acc: 0.8081\n",
      "Epoch 260/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4461 - acc: 0.8047\n",
      "Epoch 261/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4464 - acc: 0.8081\n",
      "Epoch 262/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4464 - acc: 0.8092\n",
      "Epoch 263/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4462 - acc: 0.8137\n",
      "Epoch 264/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4460 - acc: 0.8047\n",
      "Epoch 265/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4450 - acc: 0.8126\n",
      "Epoch 266/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4454 - acc: 0.8070\n",
      "Epoch 267/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4451 - acc: 0.8025\n",
      "Epoch 268/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4455 - acc: 0.8103\n",
      "Epoch 269/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4448 - acc: 0.8092\n",
      "Epoch 270/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4459 - acc: 0.8103\n",
      "Epoch 271/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4452 - acc: 0.8047\n",
      "Epoch 272/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4456 - acc: 0.8047\n",
      "Epoch 273/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4452 - acc: 0.8036\n",
      "Epoch 274/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4455 - acc: 0.8081\n",
      "Epoch 275/300\n",
      "891/891 [==============================] - 0s 31us/step - loss: 0.4450 - acc: 0.8047\n",
      "Epoch 276/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4462 - acc: 0.8058\n",
      "Epoch 277/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4453 - acc: 0.8126\n",
      "Epoch 278/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4462 - acc: 0.8081\n",
      "Epoch 279/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4488 - acc: 0.8070\n",
      "Epoch 280/300\n",
      "891/891 [==============================] - 0s 35us/step - loss: 0.4458 - acc: 0.8013\n",
      "Epoch 281/300\n",
      "891/891 [==============================] - ETA: 0s - loss: 0.4679 - acc: 0.843 - 0s 38us/step - loss: 0.4445 - acc: 0.8047\n",
      "Epoch 282/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4448 - acc: 0.8081\n",
      "Epoch 283/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4444 - acc: 0.8058\n",
      "Epoch 284/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4447 - acc: 0.8058\n",
      "Epoch 285/300\n",
      "891/891 [==============================] - 0s 31us/step - loss: 0.4444 - acc: 0.8070\n",
      "Epoch 286/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4442 - acc: 0.8025\n",
      "Epoch 287/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4451 - acc: 0.8058\n",
      "Epoch 288/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4455 - acc: 0.8058\n",
      "Epoch 289/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4452 - acc: 0.8081\n",
      "Epoch 290/300\n",
      "891/891 [==============================] - 0s 31us/step - loss: 0.4448 - acc: 0.8047\n",
      "Epoch 291/300\n",
      "891/891 [==============================] - 0s 32us/step - loss: 0.4440 - acc: 0.8036\n",
      "Epoch 292/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4443 - acc: 0.8070\n",
      "Epoch 293/300\n",
      "891/891 [==============================] - 0s 27us/step - loss: 0.4449 - acc: 0.8058\n",
      "Epoch 294/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4450 - acc: 0.8081\n",
      "Epoch 295/300\n",
      "891/891 [==============================] - 0s 29us/step - loss: 0.4440 - acc: 0.8036\n",
      "Epoch 296/300\n",
      "891/891 [==============================] - 0s 34us/step - loss: 0.4438 - acc: 0.8070\n",
      "Epoch 297/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4437 - acc: 0.8058\n",
      "Epoch 298/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4455 - acc: 0.8047\n",
      "Epoch 299/300\n",
      "891/891 [==============================] - 0s 28us/step - loss: 0.4451 - acc: 0.8070\n",
      "Epoch 300/300\n",
      "891/891 [==============================] - 0s 30us/step - loss: 0.4438 - acc: 0.8058\n"
     ]
    }
   ],
   "source": [
    "res = model.fit(x,y,epochs=300)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 154,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 155,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 156,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x2247f512668>]"
      ]
     },
     "execution_count": 156,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8VPW9//HXdzJZyAokgYQlhCXsCEJAEEXFirhU6lJF\nra321q1arbZWa2976623vdbWpdWf1lpFvVq0dala6oIVVFAk7Pu+JCEkAbKQfZbv74+ZhAABAoZM\ncs77+XjwyMyZk5nPN4e8853v+c73GGstIiLiLJ5IFyAiIm1P4S4i4kAKdxERB1K4i4g4kMJdRMSB\nFO4iIg6kcBcRc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hvzGAEXA7yNbTusZYxKB14EfWmsrmz/W2Y5LC23plMfFWhsI/673ASYYY0Ye\n8vhJPS6dLdwLgb7N7vcJb+s0rLWF4a8lwJuE3noVG2MyAcJfSyJX4XE7Uu2d7lhZa4vDv5BB4M8c\neFvcodtijIkmFIYvW2vfCG/ulMelpbZ01uPSyFpbDnwMTKcdj0tnC/fFQI4xpr8xJgaYCbwd4Zpa\nzRiTYIxJarwNTANWE2rDd8K7fQf4R2QqPCFHqv1tYKYxJtYY0x/IAb6MQH2t1vhLF3YpoWMDHbgt\nxhgD/AVYZ619pNlDne64HKktnfS4pBtjuoZvdwHOA9bTnscl0meVT+As9IWEzqJvAX4W6XqOs/YB\nhM6IrwDWNNYPpAIfAZuAuUD3SNd6hPr/SuhtsY/QmOB/HK124Gfh47QBuCDS9beiLS8Bq4CV4V+2\nzI7eFuAMQm/tVwLLw/8u7IzH5Sht6YzH5RRgWbjm1cAvwtvb7bjoE6oiIg7U2YZlRESkFRTuIiIO\npHAXEXEghbuIiAMp3EVEHEjhLiLiQAp3EREHUriLiDjQ/wcGkXbzIDZNVQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x22400857dd8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(range(300),res.history.get('acc'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python [conda env:kr]",
   "language": "python",
   "name": "conda-env-kr-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
